﻿<Window x:Class="CommanderUI.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="439" Width="840">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="23" />
            <RowDefinition Height="244*" />
            <RowDefinition Height="44" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="340*" />
            <ColumnDefinition Width="50" />
            <ColumnDefinition Width="260" />
        </Grid.ColumnDefinitions>
        <StackPanel Orientation="Horizontal" Grid.ColumnSpan="2">
            <Label Content="Com Port" />
            <TextBox Name="_textBox_CommPort" Width="60" Text="COM8" Background="LightBlue" ToolTip="Com Port Name" MaxLines="1" />
            <Label Content="@" />
            <TextBox Name="_textBox_CommPortSpeed" Width="60" Text="9600" MaxLines="1" ToolTip="Comm Port Baund rate" />
            <Button Content="Connect" Click="button_ConnectComm_Click" />
            <Label Content="Offline" Name="_label_CommStatus" Background="LightPink" />
        </StackPanel>
        <TextBox Name="_console" Background="Black" Foreground="LightGray" IsReadOnly="True" Grid.Row="1" Grid.ColumnSpan="2" />
        <TextBox Grid.Row="2" HorizontalAlignment="Stretch" Name="_input" VerticalAlignment="Stretch" Background="LightGoldenrodYellow"/>
        <Button Content="Send" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Click="SendButton_Click" IsDefault="True" />
        <WrapPanel Grid.Column="2" Grid.RowSpan="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
            <GroupBox Header="Motor Control" Name="groupBox1" HorizontalContentAlignment="Stretch" Background="{x:Null}">
                <WrapPanel Background="Red">
                    <Button Content="Button" Name="button1"  />
                    <Button Content="Button" Name="button2"  />
                    <Button Content="Button" Name="button3"  />
                    <Button Content="Button" Name="button4"  />
                    <Button Content="Button" Name="button5"  />
                    <Button Content="Button" Name="button6"  />
                    <Button Content="Button" Name="button7"  />
                    <Button Content="Button" Name="button8"  />
                    <Button Content="Button" Name="button9"  />
                    <Button Content="Button" Name="button10" />
                    <Button Content="Button" Name="button11" />
                    <Button Content="Button" Name="button12" />
                    <Button Content="Button" Name="button13" />
                    <Button Content="Button" Name="button14" />
                    <Button Content="Button" Name="button15" />
                </WrapPanel>
            </GroupBox>
            <GroupBox>
                <StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <Label>Left:</Label>
                        <Label Name="_leftEngineState">0</Label>
                        <Label>Right:</Label>
                        <Label Name="_righrEngineState">0</Label>
                    </StackPanel>
                    <Canvas Name="_moutionCanvas" Width="256" Height="256" MouseDown="UserControl_MouseDown" MouseMove="UserControl_MouseMove" MouseUp="UserControl_MouseUp" Background="#FFADFEBB">
                        <Rectangle Width="8" Height="8" Fill="Red" Stroke="Black" Canvas.Left="124" Canvas.Top="124" Name="_centerRect"></Rectangle>
                        <Line Canvas.Left="0" Canvas.Top="128" Height="1" Stroke="Black" Width="256" X2="256" />
                        <Line Canvas.Left="128" Canvas.Top="0" Height="256" Stroke="Black" Width="1" Y2="256" />
                        <Ellipse Canvas.Left="0" Canvas.Top="0" Height="256" Name="ellipse1" Stroke="Black" Width="256" />
                    </Canvas>
                </StackPanel>
            </GroupBox>
        </WrapPanel>
    </Grid>
</Window>
